﻿using System;
using Autodesk.Revit.DB;
using YArchitech.Revit;

namespace FetchDataCompare
{
	internal class GeoWindowStruct : GeoObjectStructBase, IGeoObjectStruct
	{
		public GeoWindowStruct(Element element, View view) : base(element, view)
		{
			base.Attribute = this.GetElementAttribute();
		}

		public GeoWindowStruct()
		{
		}

		public override string GetElementAttribute()
		{
			string elementAttribute = base.GetElementAttribute();
			this.GetExtendAttribute(ref elementAttribute);
			return elementAttribute;
		}

		public void GetExtendAttribute(ref string attr)
		{
			FamilyInstance familyInstance = base.UseElement as FamilyInstance;
			if (familyInstance == null)
			{
				attr = (attr ?? "");
				return;
			}
			string str = familyInstance.GetParameter(BuiltInParameter.CASEWORK_WIDTH).AsDouble().ToString("f2");
			attr = attr + str + ";";
		}
	}
}
